#include<stdio.h>
char* my_strncpy(char* dest, const char* src, unsigned int n) {
	char* ret = dest;
	while (*src && n--) *dest++ = *src++;
	return ret;
}
/*int main() {
	char arr[20] = "xxxxx world";
	char* p = "hello";
	char* p1 = my_strncpy(arr, p, 3);

	printf("%s\n", arr);
	printf("%s\n", p);
	return 0;
}*/